package may08ch14ex2;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class MyCheckedExceptions {
	public static void main(String[] args) {

		try {
			BufferedReader reader = new BufferedReader(new FileReader(new File(
					"file.txt")));
			String fileString = "";
			String line = null;
			while ((line = reader.readLine()) != null) {
				fileString = fileString + line
						+ System.getProperty("line.separator");
			}
			System.out.println(fileString);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
// apache commons
// download io jar
